package com.xcc.wchatrobot;

public class SendTuLin {
    private static final String API_KEY = "e664a2973ed9cead09be0b40f13d7afa";
    public static final String API_URL = "http://openapi.tuling123.com/openapi/api/v2";

    public SendTuLin(String userId, String text) {
        reqType = 0;
        perception = new PerceptionBean();
        InputTextBean inputTextBean = new InputTextBean();
        inputTextBean.text = text;
        perception.inputText = inputTextBean;
        userInfo = new UserInfoBean();
        userInfo.apiKey = API_KEY;
        userInfo.userId = userId;
    }

    /**
     * reqType : 0
     * perception : {"inputText":{"text":"附近的酒店"},"inputImage":{"url":"imageUrl"},"selfInfo":{"location":{"city":"北京","province":"北京","street":"信息路"}}}
     * userInfo : {"apiKey":"","userId":""}
     */
    public int reqType;//输入类型:0-文本(默认)、1-图片、2-音频
    public PerceptionBean perception;
    public UserInfoBean userInfo;

    public static class PerceptionBean {
        public InputTextBean inputText;
    }

    public static class InputTextBean {
        /**
         * text : 附近的酒店
         */
        public String text;
    }

    public static class UserInfoBean {
        /**
         * apiKey :
         * userId :
         */

        public String apiKey;
        public String userId;
    }
}
